<template>
  <el-input type="password" v-model="value" :placeholder="item.placeholder" :maxlength="item.maxLength"
    :minlength="item.minLength" show-word-limit clearable v-bind="item.props" v-on="item.props" />
</template>

<script lang="ts" setup>
import { computed } from "vue";
import { IFormItem } from '../type'
interface IProps {
  item: IFormItem;
  modelValue: any;
}
interface IEmit {
  (event: 'update:modelValue', data: any): void
}
const props = defineProps<IProps>()
const emit = defineEmits<IEmit>()
const value = computed({
  get() {
    return props.modelValue
  }, set(value) {
    emit('update:modelValue', value)
  }
})
</script>

<style scoped lang="scss"></style>